home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
bc_ti
/
ti813.asc
< prev
next >
Wrap
Text File
|
1992-02-24
|
1KB
|
67 lines
PRODUCT : Turbo C++, Borland C++ NUMBER : 813
VERSION : All
OS : DOS
DATE : February 25, 1992 PAGE : 1/1
TITLE : Dealing with Stack Overflow Problems
Symptoms of stack overflow are numerous. They include program
crashing, returning to wrong address, local/global variables
getting corrupted, and so on. The default size for the stack is
4096 bytes, or 4K. To increase the size of the stack, the
_stklen variable is used.
Here's how to make the assignment:
extern unsigned _stklen = xxxxx;
where xxxx is a number between 256 - 65535 bytes.
The variable must be declared in the global memory location in
the program, and you must include dos.h. You will get a
duplicate symbol declaration warning from the linker, which you
may ignore.
Note: The linker map will still report the stack as being 4K,
even though you changed it's size. The helpme!.doc also
describes how to increase the stack length.